<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="ViewEditDlg" widgetVar="ViewEditDialog" modal="true" resizable="false"  appendTo="@(body)" header="#{myBundle.EditViewTitle}" closeOnEscape="true">

            <h:form id="ViewEditForm">

                <h:panelGroup id="display">
                    <p:panelGrid  columns="2" rendered="#{viewController.selected != null}">

                        <h:outputLabel value="#{myBundle.EditViewLabel_id}" for="id" />
                        <h:outputText id="id" value="#{viewController.selected.id}" />


                        <p:outputLabel value="#{myBundle.EditViewLabel_user}" for="user" />
                        <p:inputText id="user" value="#{viewController.selected.user}" title="#{myBundle.EditViewTitle_user}" required="true" requiredMessage="#{myBundle.EditViewRequiredMessage_user}" size="30" maxlength="30"/>


                        <p:outputLabel value="#{myBundle.EditViewLabel_fid}" for="fid" />
                        <p:inputText id="fid" value="#{viewController.selected.fid}" title="#{myBundle.EditViewTitle_fid}" required="true" requiredMessage="#{myBundle.EditViewRequiredMessage_fid}"/>


                        <p:outputLabel value="#{myBundle.EditViewLabel_tid}" for="tid" />
                        <p:inputText id="tid" value="#{viewController.selected.tid}" title="#{myBundle.EditViewTitle_tid}" required="true" requiredMessage="#{myBundle.EditViewRequiredMessage_tid}"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{viewController.save}" value="#{myBundle.Save}" update="display,:ViewListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,ViewEditDialog);">
                        <p:confirm header="#{myBundle.ConfirmationHeader}" message="#{myBundle.ConfirmEditMessage}" icon="ui-icon-alert"/>
                    </p:commandButton>
                    <p:commandButton value="#{myBundle.Cancel}" onclick="ViewEditDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
